const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,

  outputDir: process.env.VUE_APP_ONLINE === 'YES' ? '../online-www/s' : '../www/s',

  devServer: {
    proxy: {
      '/api': {
        target: 'http://bfc.api:9911',
        changeOrigin: true,
        pathRewrite: {
          '^/api/': '/admin/',
        }
      },
      '/apis': {
        target: 'http://bfc.api:9911',
        changeOrigin: true,
        pathRewrite: {
          '^/apis': '/'
        }
      },
      '/qrcode/*': {
        target: 'http://bfc.api:9911',
        changeOrigin: true
      }
    }
  },

})
